package com.changgou.seckill.dao;

import com.changgou.seckill.pojo.SeckillOrder;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

/**
 * @Author: HuangFu
 * @Date: 2020/2/23 9:57
 * @Description:
 */
public interface SeckillOrderMapper extends Mapper<SeckillOrder> {

    /**
     * 查询用户秒杀商品
     * @param username
     * @param id
     * @return
     */
    @Select("select * from tb_seckill_order where user_id=#{username} and id = #{id}")
    SeckillOrder getOrderInfoByUserNameAndGoodsId(@Param("username") String username,@Param("id") Long id);
}
